package org.qydjk.common.pojo;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by ASUS on 2017/12/28.
 */
@Entity
@Table(name = "qy_date", schema = "qydjk", catalog = "")
public class QyDate {
    private Integer id;
    private Date qyDate;
    private Integer qyYear;
    private Integer qyMonth;
    private Integer qyDay;
    private Integer qyWeek;
    private Integer holiday;
    private String holidayName;
    private Date createTime;
    private Date updateTime;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "qy_date")
    public Date getQyDate() {
        return qyDate;
    }

    public void setQyDate(Date qyDate) {
        this.qyDate = qyDate;
    }

    @Basic
    @Column(name = "qy_year")
    public Integer getQyYear() {
        return qyYear;
    }

    public void setQyYear(Integer qyYear) {
        this.qyYear = qyYear;
    }

    @Basic
    @Column(name = "qy_month")
    public Integer getQyMonth() {
        return qyMonth;
    }

    public void setQyMonth(Integer qyMonth) {
        this.qyMonth = qyMonth;
    }

    @Basic
    @Column(name = "qy_day")
    public Integer getQyDay() {
        return qyDay;
    }

    public void setQyDay(Integer qyDay) {
        this.qyDay = qyDay;
    }

    @Basic
    @Column(name = "qy_week")
    public Integer getQyWeek() {
        return qyWeek;
    }

    public void setQyWeek(Integer qyWeek) {
        this.qyWeek = qyWeek;
    }

    @Basic
    @Column(name = "holiday")
    public Integer getHoliday() {
        return holiday;
    }

    public void setHoliday(Integer holiday) {
        this.holiday = holiday;
    }

    @Basic
    @Column(name = "holiday_name")
    public String getHolidayName() {
        return holidayName;
    }

    public void setHolidayName(String holidayName) {
        this.holidayName = holidayName;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        QyDate date = (QyDate) o;

        if (id != null ? !id.equals(date.id) : date.id != null) return false;
        if (qyDate != null ? !qyDate.equals(date.qyDate) : date.qyDate != null) return false;
        if (qyYear != null ? !qyYear.equals(date.qyYear) : date.qyYear != null) return false;
        if (qyMonth != null ? !qyMonth.equals(date.qyMonth) : date.qyMonth != null) return false;
        if (qyDay != null ? !qyDay.equals(date.qyDay) : date.qyDay != null) return false;
        if (qyWeek != null ? !qyWeek.equals(date.qyWeek) : date.qyWeek != null) return false;
        if (holiday != null ? !holiday.equals(date.holiday) : date.holiday != null) return false;
        if (holidayName != null ? !holidayName.equals(date.holidayName) : date.holidayName != null) return false;
        if (createTime != null ? !createTime.equals(date.createTime) : date.createTime != null) return false;
        if (updateTime != null ? !updateTime.equals(date.updateTime) : date.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (qyDate != null ? qyDate.hashCode() : 0);
        result = 31 * result + (qyYear != null ? qyYear.hashCode() : 0);
        result = 31 * result + (qyMonth != null ? qyMonth.hashCode() : 0);
        result = 31 * result + (qyDay != null ? qyDay.hashCode() : 0);
        result = 31 * result + (qyWeek != null ? qyWeek.hashCode() : 0);
        result = 31 * result + (holiday != null ? holiday.hashCode() : 0);
        result = 31 * result + (holidayName != null ? holidayName.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
